using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using FutureOpen.Web.Pages;
using FutureOpen.Core.func.sql;

public partial class controls_GroupNewUsrs : System.Web.UI.UserControl
{
    private int gid;
    private PageBase pbase;
    protected void Page_Load(object sender, EventArgs e)
    {
        pbase = (PageBase)this.Page;
        pbase.PageInit();

        gid = pbase.orgid;
        if (!Page.IsPostBack)
        {
            BuildRecentUsr();
        }
    }

    public void BuildRecentUsr()
    {
        StringBuilder sb = new StringBuilder();
        DataSet ds = GroupProvider.GetRecentUsrs(gid,0, 9);
        foreach(DataRow dr in ds.Tables[0].Rows)
        {
            sb.Append("<li>");
            sb.Append("<img src='../test/GetImage.ashx?id='"+dr["usr_pic"].ToString()+" />");
            sb.Append("<span>"+pbase.GetUsrUrl(dr)+"</span></li>");
        }
        this.lbContent.Text = sb.ToString();
    }
}
